<template>
	<el-drawer title="人员福利记录详情" v-model="visible" :size="800" destroy-on-close @closed="$emit('closed')">
		<el-container v-loading="loading">
			<el-main>
				<el-form>
					<el-form-item label="福利标题" prop="title">{{form.title}}
					</el-form-item>
					<el-row :gutter="24">
						<el-col :lg="12">
							<el-form-item label="排序号" prop="sortNo">{{form.sortNo}}
							</el-form-item>
						</el-col>
						<el-col :lg="12">
							<el-form-item label="人员姓名" prop="userId">{{form.userName}}
							</el-form-item>
						</el-col>
					</el-row>
					<el-row :gutter="24">
						<el-col :lg="12">
							<el-form-item label="发放年度" prop="year">{{form.year}}
							</el-form-item>
						</el-col>
						<el-col :lg="12">
							<el-form-item label="发放月份" prop="month">{{form.month}}月
							</el-form-item>
						</el-col>
					</el-row>
					<el-row :gutter="24">
						<el-col :lg="12">
							<el-form-item label="福利类型" prop="welfareType">{{form.welfareTypeName}}
							</el-form-item>
						</el-col>
						<el-col :lg="12">
							<el-form-item label="福利金额" prop="amount">{{form.amount}}
								/元
							</el-form-item>
						</el-col>
					</el-row>
					<el-form-item label="备注说明">{{form.remark}}
					</el-form-item>
				</el-form>
				<el-footer style="text-align: center;">
					<el-button @click="visible=false">关闭</el-button>
				</el-footer>
			</el-main>
		</el-container>
	</el-drawer>
</template>

<script>
export default {
	emits: ['success', 'closed'],
	components: {
	},
	data() {
		return {
			loading: false,
			form: {
				recordId: "",
				title:"",
				sortNo: 0,
				userName: "",
				year: "",
				month: "",
				welfareTypeName:"",
				amount:0,
				remark:""
			},
			visible: false,
			isSaveing: false,
		}
	},
	mounted() {

	},
	methods: {
		//显示
		open(model){
			this.model=model;
			this.visible = true;
			return this;
		},
		//表单注入数据
		setData(data){
			this.form.recordId = data.recordId
			this.form.sortNo = data.sortNo
			this.form.userName = data.userName
			this.form.year = data.year
			this.form.month = data.month
			this.form.title = data.title
			this.form.welfareTypeName = data.welfareTypeName
			this.form.amount = data.amount
			this.form.remark = data.remark
		},
	}
}
</script>

<style>
</style>
